class RoomdescsController < ApplicationController
  # GET /roomdescs
  # GET /roomdescs.xml
  def index
    @roomdescs = Roomdesc.all

    respond_to do |format|
      format.html # index.html.erb
      format.xml  { render :xml => @roomdescs }
    end
  end

  # GET /roomdescs/1
  # GET /roomdescs/1.xml
  def show
    @roomdesc = Roomdesc.find(params[:id])

    respond_to do |format|
      format.html # show.html.erb
      format.xml  { render :xml => @roomdesc }
    end
  end

  # GET /roomdescs/new
  # GET /roomdescs/new.xml
  def new
    @roomdesc = Roomdesc.new

    respond_to do |format|
      format.html # new.html.erb
      format.xml  { render :xml => @roomdesc }
    end
  end

  # GET /roomdescs/1/edit
  def edit
    @roomdesc = Roomdesc.find(params[:id])
  end

  # POST /roomdescs
  # POST /roomdescs.xml
  def create
    @roomdesc = Roomdesc.new(params[:roomdesc])

    respond_to do |format|
      if @roomdesc.save
        format.html { redirect_to(@roomdesc, :notice => 'Roomdesc was successfully created.') }
        format.xml  { render :xml => @roomdesc, :status => :created, :location => @roomdesc }
      else
        format.html { render :action => "new" }
        format.xml  { render :xml => @roomdesc.errors, :status => :unprocessable_entity }
      end
    end
  end

  # PUT /roomdescs/1
  # PUT /roomdescs/1.xml
  def update
    @roomdesc = Roomdesc.find(params[:id])

    respond_to do |format|
      if @roomdesc.update_attributes(params[:roomdesc])
        format.html { redirect_to(@roomdesc, :notice => 'Roomdesc was successfully updated.') }
        format.xml  { head :ok }
      else
        format.html { render :action => "edit" }
        format.xml  { render :xml => @roomdesc.errors, :status => :unprocessable_entity }
      end
    end
  end

  # DELETE /roomdescs/1
  # DELETE /roomdescs/1.xml
  def destroy
    @roomdesc = Roomdesc.find(params[:id])
    @roomdesc.destroy

    respond_to do |format|
      format.html { redirect_to(roomdescs_url) }
      format.xml  { head :ok }
    end
  end
end
